 package com.printer.bluetooth.android;
 
 import java.util.ArrayList;
 import java.util.List;
 
 public class Table
 {
   private List<String> table;
   private String tableReg;
   private int[] tableColWidth;
   private boolean mHasSeparator;
 
   public Table(String column, String regularExpression, int[] columnWidth)
   {
     this.table = new ArrayList();
     this.table.add(column);
 
     this.tableReg = regularExpression;
     if (columnWidth != null) {
       this.tableColWidth = columnWidth;
     } else {
       this.tableColWidth = new int[column.split(regularExpression).length];
       for (int i = 0; i < this.tableColWidth.length; i++)
         this.tableColWidth[i] = 8;
     }
   }
 
   public List<String> getTableData()
   {
     return this.table;
   }
 
   public void add(String row) {
     if (this.table != null)
       this.table.add(row);
   }
 
   public void get(int location)
   {
     if (this.table != null)
       this.table.get(location);
   }
 
   public String getRegularExpression()
   {
     return this.tableReg;
   }
 
   public void setHasSeparator(boolean hasSeparator) {
     this.mHasSeparator = hasSeparator;
   }
 
   public boolean hasSeparator() {
     return this.mHasSeparator;
   }
 
   public int[] getColumnWidth() {
     return this.tableColWidth;
   }
 }


